﻿using AdvCMS.Data;
using AdvCMS.Data.Linq;
using AdvCMS.Data.Repositories;
using Microsoft.AspNet.Identity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AdvCMS.Security
{
    public class AdvCMSUserStore : IUserStore <AdvUser, int>
    
    {
        private IUserRepository userRepo;
        public AdvCMSUserStore(IUserRepository userRepo)
        {
            this.userRepo = userRepo;
        }
        public System.Threading.Tasks.Task CreateAsync(AdvUser user)
        {
            this.userRepo.Insert(user);
            return null;         }

        public System.Threading.Tasks.Task DeleteAsync(AdvUser user)
        {
            this.userRepo.Delete(user);
            return null;
        }

        public System.Threading.Tasks.Task<AdvUser> FindByIdAsync(int userId)
        {
            throw new NotImplementedException();
        }

        public System.Threading.Tasks.Task<AdvUser> FindByNameAsync(string userName)
        {
            throw new NotImplementedException();
        }

        public System.Threading.Tasks.Task UpdateAsync(AdvUser user)
        {
            throw new NotImplementedException();
        }

        public void Dispose()
        {
           
        }
    }
}
